package com.dianping.cat.home.heartbeat.entity;

import com.dianping.cat.home.heartbeat.BaseEntity;
import com.dianping.cat.home.heartbeat.IVisitor;
import java.util.LinkedHashMap;
import java.util.Map;





public class Group
  extends BaseEntity<Group>
{
  private String m_id;
  private int m_order;
/* 17 */   private Map<String, Metric> m_metrics = new LinkedHashMap();





/* 23 */   public Group(String id) { this.m_id = id; }




/* 28 */   public void accept(IVisitor visitor) { visitor.visitGroup(this); }


  public Group addMetric(Metric metric) {
/* 32 */     this.m_metrics.put(metric.getId(), metric);
/* 33 */     return this;
  }


  public boolean equals(Object obj) {
/* 38 */     if (obj instanceof Group) {
/* 39 */       Group _o = (Group)obj;

/* 41 */       if (!equals(getId(), _o.getId())) {
/* 42 */         return false;
      }

/* 45 */       return true;
    }

/* 48 */     return false;
  }


/* 52 */   public Metric findMetric(String id) { return (Metric)this.m_metrics.get(id); }



/* 56 */   public String getId() { return this.m_id; }



/* 60 */   public Map<String, Metric> getMetrics() { return this.m_metrics; }



/* 64 */   public int getOrder() { return this.m_order; }



  public int hashCode() {
/* 69 */     int hash = 0;

/* 71 */     return hash * 31 + ((this.m_id == null) ? 0 : this.m_id.hashCode());
  }




  public void mergeAttributes(Group other) {
/* 78 */     assertAttributeEquals(other, "group", "id", this.m_id, other.getId());

/* 80 */     this.m_order = other.getOrder();
  }


/* 84 */   public Metric removeMetric(String id) { return (Metric)this.m_metrics.remove(id); }


  public Group setId(String id) {
/* 88 */     this.m_id = id;
/* 89 */     return this;
  }

  public Group setOrder(int order) {
/* 93 */     this.m_order = order;
/* 94 */     return this;
  }

  public Group() {}
}


/* Location:              /Users/hanfei/Documents/apache-tomcat-9.0.24/webapps/cat/WEB-INF/classes/!/com/dianping/cat/home/heartbeat/entity/Group.class
 * Java compiler version: 7 (51.0)
 * JD-Core Version:       1.0.7
 */